<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title></title>
		<script type="text/javascript" src="js/jquery.min.js" ></script>
	</head>

	<body>
		<form class="mui-input-group" id="tologin" method="post" action="http://192.168.43.26:8080/punchCard/to_login.action">
			<!--<input type="hidden" value="1" name="aid"/>-->
			<div class="mui-input-row">
				<label>用户名</label>
				<input type="text" name="studentNumber" class="mui-input-clear" placeholder="请输入用户名">
			</div>
			<div class="mui-input-row">
				<label>密码</label>
				<input type="password" name="password" class="mui-input-password" placeholder="请输入密码">
			</div>
			<!--<ul class="mui-table-view mui-table-view-chevron">
					<li class="mui-table-view-cell">
						记住密码
						<div id="rtp" class="mui-switch mui-action">
							<div class="mui-switch-handle"></div>
						</div>
					</li>
				</ul>-->
			<!--<ul class="mui-table-view mui-table-view-chevron">
					<li class="mui-table-view-cell">
						自动登录
						<div id="autoLogin" class="mui-switch mui-active">
							<div class="mui-switch-handle"></div>
						</div>
					</li>
				</ul>-->
				<input type="submit" value="提交" />
		</form>
		<div class="mui-content-padded" id="login" style="margin-top:60px;">
			<button id='login1' class="mui-btn mui-btn-block mui-btn-green">登录</button>
		</div>
		<script>
			$("#login").click(function() {
				alert($("#tologin").serialize());
				$.ajax({
					url: 'http://192.168.43.26:8080/punchCard/to_login.action',
					data: $("#tologin").serialize(),
					type: 'post',
					/*processData: false,*/
					/*contentType: false,*/
					dataType: 'json',
					success: function(rtn) {
                        alert(rtn.status==1);
						alert(rtn.student.studentName);

					}
				});

			})
		</script>
	</body>

</html>